{template 'common/header'}
{if $act == 'display'}
<ul class="nav nav-tabs">
	{loop $credit_group $key $credit}
	<li {if $type == $key}class="active"{/if}>
		<a href="{php echo $this->createWebUrl('creditrank', array('type'=>$key));}">{$credit['title']}排行榜</a>
	</li>
	{/loop}
</ul>
<div class="panel panel-info">
    <div class="panel-heading">筛选</div>
    <div class="panel-body">
        <form action="" method="post" class="form-horizontal" role="form">
            <div class="form-group">
                <label class="col-xs-12 col-sm-4 col-md-3 col-lg-3 control-label">会员ID/昵称</label>
                <div class="col-sm-5 col-xs-5">
                    <input class="form-control" name="fans_keys" type="text" value="{$_GPC['fans_keys']}" placeholder="会员ID/昵称">
                </div>
                <div class="col-xs-12 col-sm-2 col-md-2 col-lg-2">
                    <button class="btn btn-default"><i class="fa fa-search"></i>搜索</button>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="panel panel-default ">
	<div class="table-responsive panel-body">
		<table class="table table-hover">
			<thead class="navbar-inner">
			<tr>
				<th width="100">排名</th>
				<th width="300">头像/昵称</th>
				<th>{$credit_group[$type]['title']}数</th>
			</tr>
			</thead>
			<tbody>
			{loop $list $li}
			<tr>
				<td>{$li['index']}</td>
				<td>
					<div class="clearfix">
						<div class="pull-left" style="width: 40px;height: 40px; overflow: hidden; border-radius: 50%;">
							<img src="{php echo tomedia($li['avatar'])}" onerror="this.src='../app/resource/images/heading.jpg'" style="width: 100%" />
						</div>
						<div class="pull-left" style="line-height: 40px; margin-left: 10px;">
							{if $li['nickname']!=''}{$li['nickname']}{else}{$li['uid']}{/if}
						</div>
					</div>
				</td>
				<td>{$li[$type]}</td>
			</tr>
			{/loop}
			</tbody>
		</table>
	</div>
</div>
{$pager}
{/if}
{template 'common/footer'}